package org.hard.netty.c2;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

/**
 * @author: 王林博
 * @date: 2022年08月13日 9:24
 */
public class Client {
    public static void main(String[] args) throws IOException {
        SocketChannel channel = SocketChannel.open();
        channel.connect(new InetSocketAddress("localhost",8080));
        channel.write(Charset.defaultCharset().encode("1234567890123456AAAAA\n"));
        System.in.read();
    }
}
